import { applyMiddleware, createStore }  from 'redux'
import rootReducer from './reducers'
// createStore的第一个参数必须是一个reducer, 如果是多个，需要在reducers目录下线使用combinReducers合并之后再导出
// export default createStore(rootReducer)

// 异步action 需要使用中间件
import thunk from 'redux-thunk'
export default createStore(rootReducer, applyMiddleware(thunk))